//    https://ac.nowcoder.com/acm/contest/11214/D



#include <iostream>
using namespace std;

typedef long long LL;
LL a[100004], b[100004], a_sum[100004], b_sum[100004];

int main()
{
    int n, k;
    LL s1 = 0, s2 = 0;
    cin >> n >> k;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        a_sum[i] = s1 += a[i];
    }

    for (int i = 0; i < n; i++)
    {
        cin >> b[i];
        b_sum[i] = s2 += b[i];
    }

    LL mxA = 0, mnB = 0x3f3f3f, day = k;
    for (int i = k - 1; i < n; i++)
    {
        if (mxA < a_sum[i] - a_sum[i - k])
        {
            mxA = a_sum[i] - a_sum[i - k];
            mnB = b_sum[i] - b_sum[i - k];
            day = i;
        }
        if (mxA == a_sum[i] - a_sum[i - k] && mnB > b_sum[i] - b_sum[i - k])
        {
            mxA = a_sum[i] - a_sum[i - k];
            mnB = b_sum[i] - b_sum[i - k];
            day = i;
        }
    }
    cout << day - k + 2;
}